<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const arr = [1, 2, 3]
        // let arr1 = []
        // let [a, b, c] = arr
        for (let i = 0; i < 3; i++) {
            arr[i] = function () {
                console.log(i);
            }
        }
        console.log(arr);
        let [arr1, arr2, arr3] = arr
        console.log(arr1);
        console.log(arr2);
        console.log(arr3);
    </script>
</body>

</html>